package tw.com.stock.common;

import tw.com.bean.DTO;
import tw.com.bean.SettingDTO;
import tw.com.bean.WebDTO;
import tw.com.enumType.WebType;
import tw.com.stock.commom.WebReader;
import tw.com.stock.common.WebCommon;
import tw.com.stock.exception.StockException;

public class WebCommonImpl implements WebCommon {

	private WebReader reader = new WebReader();

	@Override
	public boolean checkStatus(DTO dto, SettingDTO ext) {
		return this.reader.getWebType(dto.getFullUr()) == WebType.ok ? true
				: false;
	}

	@Override
	public WebDTO getConnectData(DTO dto, SettingDTO ext) {
		return this.reader.getWebDTO(dto.getFullUr());
	}

	@Override
	public <T> T makeUpDTOFormContent(DTO dto, SettingDTO ext)
			throws StockException {
		// TODO Auto-generated method stub
		return null;
	}

}
